$(function(){

});

function click_add(){
	$.messager.alert('错误','尚不支持!','error');
}

function click_row_edit(){
	frame.window.openWindow("/quant/manage/modeldetail.jsp");
}


function click_row_delete(){
	$.messager.confirm('确认','您确认想要删除模型吗？',
		function(r){    
		    if (r){  
		    	deleteModel();
		    }
		}
	);
}
	
function deleteModel(){
	var row = $('#dg').datagrid("getSelected");
	var index = $('#dg').datagrid("getRowIndex", row);
	$.post("./modeldelete.json",
			row,
	 		function(data) {
				if(data.sucesse==true){
					$('#dg').datagrid("deleteRow",index);
				}
			}
	);
}
